#include <stdio.h>
#include "head.h"

int main()
{
    int a, b;
    char c;
    printf("请输入二则表达式\n");
    scanf("%d%c%d", &a, &c, &b);
    switch (c)
    {
    case '+':
        printf("%d\n", add(a, b));
        break;
    case '-':
        printf("%d\n", sub(a, b));
        break;
    case '*':
        printf("%d\n", mul(a, b));
        break;
    case '/':
        if(b == 0)
        {
            printf("b = 0 error\n");
        }
        else
        printf("%d\n", div(a, b));
        break;
    default:
        break;
    }

    return 0;
}